require([ "dojo/parser", "dojo/ready", "dojo/dom", "dojo/_base/fx", "dijit/layout/BorderContainer",
		"dijit/layout/ContentPane", "dojox/layout/ContentPane",
		"gridx/core/model/cache/Sync" ], function(parser, ready, dom,  fx, BorderContainer,
		ContentPane, xContentPane, Sync) {
	var setting = {
		data : {
			simpleData : {
				enable : true
			}
		}
	};

	var zNodes = [ {
		id : 1,
		pId : 0,
		name : "用户",
		url:"../safe/user/list.action",
		target:"main"
	}, {
		id : 2,
		pId : 0,
		name : "资源",
		url:"../safe/resource/show.action",
		target:"main"
	}, {
		id : 3,
		pId : 0,
		name : "角色",
		url:"../safe/role/show.action",
		target:"main"
	}, {
		id : 4,
		pId : 0,
		name : "权限"
	} ];

	$(document).ready(function() {
		$.fn.zTree.init($("#treeDemo"), setting, zNodes);
	});
	
	ready(function(){
		setTimeout(function(){
			parser.parse();
			dom.byId('loderInnerInfo').innerHTML = "加载完成";
			setTimeout(function hideLoader(){
				fx.fadeOut({ 
					node: 'loader', 
					duration:500,
					onEnd: function(n){
						n.style.display = "none";
					}
				}).play();
			}, 350);				
			
		}, 520);
	
	});
});